package mapper;

import entity.WorkOrder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface WorkOrderMapper {
    //工单创建
    @Insert("INSERT INTO"+
            "work_order(customer_id,business_id,status,creat_time)" +
            "VALUES(#{customerId},#{businessId},0,NOW())")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void insert(WorkOrder workOrder);
    //工单回单
    void replyWorkOrder(WorkOrder workOrder);
    //工单退单
    void cancelWorkOrder(WorkOrder workOrder);


    //区域内工单查询
     void selectWorkOrderByRegion(WorkOrder workOrder);
}
